package love.xin.ui.diary

import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider
import love.xin.databinding.FragmentDiaryBinding

class DiaryFragment : Fragment() {

    private lateinit var bin: FragmentDiaryBinding
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        val diaryViewModel =
            ViewModelProvider(this)[DiaryViewModel::class.java]

        bin = FragmentDiaryBinding.inflate(inflater, container, false)

        bin.start.setOnClickListener{
            Intent(requireContext(),IncreaseActivity::class.java).also {
                startActivity(it)
            }
        }

        diaryViewModel.text.observe(viewLifecycleOwner) {

        }
        return bin.root
    }


}